import 'package:app/shared/constants/common.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';

class ListCom extends StatelessWidget {
  const ListCom({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Column(
      children: List.generate(
        5,
        (index) => ListTile(
          leading: CircleAvatar(
            radius: 24,
            backgroundImage: AssetImage("assets/test/girl.jpeg"),
          ),
          title: Text(
            '李蓝',
            style: TextStyle(fontWeight: FontWeight.bold, fontSize: 16),
          ),
          subtitle: Text('你拍的照片真酷'),
          trailing: Column(
            mainAxisAlignment: MainAxisAlignment.spaceEvenly,
            children: [
              Text(
                "12分钟前",
                style: TextStyle(color: sTextColorDes, fontSize: 12),
              ),
              CircleAvatar(
                  backgroundColor: Colors.red.shade400,
                  radius: 7,
                  child: Text(
                    "3",
                    style: TextStyle(color: Colors.white, fontSize: 10),
                  ))
            ],
          ),
          onTap: () {
            Get.toNamed("/home/chat_screen");
          },
        ),
      ),
    );
  }
}
